package com.company.model;

import java.math.BigDecimal;

public class EmployeeQuery {
    private String name;        // 姓名模糊查询
    private String department;  // 部门精确查询
    private String position;    // 职位精确查询
    private BigDecimal minSalary; // 最低薪资
    private BigDecimal maxSalary; // 最高薪资
    private int pageNum = 1;    // 当前页码（默认第1页）
    private int pageSize = 5;   // 每页条数（默认5条）

    // 计算分页起始位置（MyBatis分页用）
    public int getStartIndex() {
        return (pageNum - 1) * pageSize;
    }

    // getter和setter
    public String getName() { return name; }
    public void setName(String name) { this.name = name; }
    public String getDepartment() { return department; }
    public void setDepartment(String department) { this.department = department; }
    public String getPosition() { return position; }
    public void setPosition(String position) { this.position = position; }
    public BigDecimal getMinSalary() { return minSalary; }
    public void setMinSalary(BigDecimal minSalary) { this.minSalary = minSalary; }
    public BigDecimal getMaxSalary() { return maxSalary; }
    public void setMaxSalary(BigDecimal maxSalary) { this.maxSalary = maxSalary; }
    public int getPageNum() { return pageNum; }
    public void setPageNum(int pageNum) { this.pageNum = pageNum; }
    public int getPageSize() { return pageSize; }
    public void setPageSize(int pageSize) { this.pageSize = pageSize; }
}